/*
 * @Author: 肖思汗 
 * @Date: 2025-06-25 09:26:19 
 * @Last Modified by: 肖思汗
 * @Last Modified time: 2025-06-25 18:31:11
 */


import Api from "src/api/Api";
import firstListJSON from "./firstList.json";
//接口模版
class TextApi extends Api {

    constructor() {
        super();
    }

    //获取字体列表
    getFonts(pageNum: number, pageSize: number) {
        return firstListJSON;
        return this._get("/font/listFont", { pageSize, pageNum, status: true });
    }


    // 获取字体详情
    getFontsById(fontIds: number[]) {
        // 过滤掉无效的字体ID（undefined、null、0）并去重
        const validFontIds = Array.from(new Set(fontIds.filter(id => id !== undefined && id !== null && id !== 0)));
        return this._get("/font/getFontById", { fontId: validFontIds.join(',') });
    }


}

const textApi = new TextApi();

export default textApi;